package cn.tedu._01mvcboot01.controller;

import cn.tedu._01mvcboot01.pojo2.dto.VehicleCarDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class VehicleController {
    /*@RequestMapping("/v1/vehicle/car")
    @ResponseBody
    public String car(String brand, String model,double price) {
        System.out.println("品牌"+brand);
        System.out.println("型号"+model);
        System.out.println("价格"+price);

        return "添加成功";
    }
    @RequestMapping("/v1/vehicle/car2")
    @ResponseBody
    public String car2(VehicleCarDTO vehicleCarDTO) {
        String brand = vehicleCarDTO.getBrand();
        String model = vehicleCarDTO.getModel();
        double price = vehicleCarDTO.getPrice();
        System.out.println("品牌:"+brand);
        System.out.println("型号:"+model);
        System.out.println("价格:"+price);
        return "添加成功";
    }*/
    @RequestMapping("car3")
    @ResponseBody
    public String car3(VehicleCarDTO vehicleCarDTO) {

        System.out.println("品牌:"+vehicleCarDTO.getBrand());
        System.out.println("型号:"+vehicleCarDTO.getModel());
        System.out.println("价格:"+vehicleCarDTO.getPrice());
        return "添加成功";
    }


}
